package cn.tedu.backend.portal.controller;

import cn.tedu.backend.portal.model.Attractions;
import cn.tedu.backend.portal.model.Picture;
import cn.tedu.backend.portal.service.IPictureService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
public class PictureController {
  @Resource
  private IPictureService service;

  @RequestMapping("/getPictures")
  public List<Picture> getPictures(){
    return service.getPictures();
  }

  @RequestMapping("/selectPictureById/{id}")
  public List<Picture> selectPictureById(@PathVariable int id){
    return service.selectPictureById(id);
  }
}
